package com.novellotus.iov.carvice.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Rich on 2017/10/17.
 */

public class RxDiagnosisAlarm implements Parcelable {


    /**
     * pn : 川C00005
     * vin : LS3D3TB18H0018036
     * createTime : 1509421768000
     * lastTime : true
     * highestAlarmLevel : 2
     * charging : 1
     * lng : 104.578704
     * lat : 30.727562
     * timeLines : [1509421768000,1509352491000,1509351980000]
     * modelValues : {"total_voltage":"586.700000","lowest_temp_battery_probe_num":"7.000000","highest_temp_battery_probe_num":"15.000000","insulation_resistance":"49665.000000","total_current":"0.000000","highest_voltage_battery_subsys_num":"1.000000","lowest_voltage_battery_single_num":"114.000000","battery_single_lowest_voltage":"4.044000","battery_single_highest_voltage":"4.144000","highest_temp_battery_subsys_num":"1.000000","lowest_voltage_battery_subsys_num":"1.000000","highest_voltage_battery_single_num":"68.000000","lowest_temp":"27.000000","highest_temp":"33.000000","lowest_temp_battery_subsys_num":"1.000000","soc":"99.000000"}
     * alarms : [{"code":"insulation","name":"绝缘报警","displayCode":"E","alerts":2,"eliminates":30,"overTime":1509434266000,"over":1,"causes":[{"code":"53FdTjgV7EN4syf6sbqU7b","cause":"高压插件漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"5kvT8nWX397D8n75foGpTu","cause":"打气泵漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"4ZWQmSRJ4YhonhxTax7rd3","cause":"高压插头进水","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"EngCQAhYgCq1CwCKueXLDD","cause":"高压配电盒漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"2sRu2yukeqEZPy2uVnNgTd","cause":"直流充电插座低压信号插件进水","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"krG2yueyFar6HBLVCgtXo","cause":"三合一（四合一）辅助驱动漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"25jrxjmfF3dBKAUoCZFKCq","cause":"电池箱进水","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"JrvC4unX8X89bQuTWJV5ua","cause":"DC-DC漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"Ksezt8RhFVM9i3hvgFEz5n","cause":"充电插座进水","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"HKAEn5n5YjnTGeS1vDpthM","cause":"转向泵漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"Lzbm6dqYZFKTFbAhVUaYnA","cause":"电机控制器漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"4RbSnGvGBZtb28gAtYfYbK","cause":"车载充电机漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"SsHAH7cT5tbD76sRLXbhyP","cause":"空调压缩机漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"5D93FY7eecnSbQ1hAVNpuZ","cause":"电机漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"4nTb5cLTnDkB6FHZn9AUSK","cause":"电池箱漏电","causeCheck":0,"usageRate":9.99,"sortno":0}],"schemes":[{"code":"DASxKrA8ggmwVGCrP3H9am","scheme":"行驶状态：检查高压插头是否进水（漏电）","schemeCheck":0,"usageRate":9.99,"sortno":0},{"code":"LxyMTkCuWw5PXg7rhwoqZt","scheme":"充电状态：检查充电线路（充电插座、充电机、低压信号插件、高压插件）","schemeCheck":0,"usageRate":9.99,"sortno":0},{"code":"CwVozH6GqV3dfsc8ThsEu","scheme":"行驶状态：检查高压用电设备（所有）是否漏电","schemeCheck":0,"usageRate":9.99,"sortno":0}]}]
     * components : [{"compCode":"comp_bms","compName":"BMS","displayCode":"E"}]
     */

    private String pn;
    private String vin;
    private long createTime;
    private boolean lastTime;
    private int highestAlarmLevel;
    private int charging;
    private double lng;
    private double lat;
    private ModelValuesBean modelValues;
    private List<Long> timeLines;
    private List<AlarmsBean> alarms;
    private List<ComponentsBean> components;

    public String getPn() {
        return pn;
    }

    public void setPn(String pn) {
        this.pn = pn;
    }

    public String getVin() {
        return vin;
    }

    public void setVin(String vin) {
        this.vin = vin;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public boolean isLastTime() {
        return lastTime;
    }

    public void setLastTime(boolean lastTime) {
        this.lastTime = lastTime;
    }

    public int getHighestAlarmLevel() {
        return highestAlarmLevel;
    }

    public void setHighestAlarmLevel(int highestAlarmLevel) {
        this.highestAlarmLevel = highestAlarmLevel;
    }

    public int getCharging() {
        return charging;
    }

    public void setCharging(int charging) {
        this.charging = charging;
    }

    public double getLng() {
        return lng;
    }

    public void setLng(double lng) {
        this.lng = lng;
    }

    public double getLat() {
        return lat;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public ModelValuesBean getModelValues() {
        return modelValues;
    }

    public void setModelValues(ModelValuesBean modelValues) {
        this.modelValues = modelValues;
    }

    public List<Long> getTimeLines() {
        return timeLines;
    }

    public void setTimeLines(List<Long> timeLines) {
        this.timeLines = timeLines;
    }

    public List<AlarmsBean> getAlarms() {
        return alarms;
    }

    public void setAlarms(List<AlarmsBean> alarms) {
        this.alarms = alarms;
    }

    public List<ComponentsBean> getComponents() {
        return components;
    }

    public void setComponents(List<ComponentsBean> components) {
        this.components = components;
    }

    public static class ModelValuesBean implements Parcelable {

        /**
         * total_voltage : 586.700000
         * lowest_temp_battery_probe_num : 7.000000
         * highest_temp_battery_probe_num : 15.000000
         * insulation_resistance : 49665.000000
         * total_current : 0.000000
         * highest_voltage_battery_subsys_num : 1.000000
         * lowest_voltage_battery_single_num : 114.000000
         * battery_single_lowest_voltage : 4.044000
         * battery_single_highest_voltage : 4.144000
         * highest_temp_battery_subsys_num : 1.000000
         * lowest_voltage_battery_subsys_num : 1.000000
         * highest_voltage_battery_single_num : 68.000000
         * lowest_temp : 27.000000
         * highest_temp : 33.000000
         * lowest_temp_battery_subsys_num : 1.000000
         * soc : 99.000000
         */

        private String total_voltage;
        private String lowest_temp_battery_probe_num;
        private String highest_temp_battery_probe_num;
        private String insulation_resistance;
        private String total_current;
        private String highest_voltage_battery_subsys_num;
        private String lowest_voltage_battery_single_num;
        private String battery_single_lowest_voltage;
        private String battery_single_highest_voltage;
        private String highest_temp_battery_subsys_num;
        private String lowest_voltage_battery_subsys_num;
        private String highest_voltage_battery_single_num;
        private String lowest_temp;
        private String highest_temp;
        private String lowest_temp_battery_subsys_num;
        private String soc;

        public String getTotal_voltage() {
            return total_voltage;
        }

        public void setTotal_voltage(String total_voltage) {
            this.total_voltage = total_voltage;
        }

        public String getLowest_temp_battery_probe_num() {
            return lowest_temp_battery_probe_num;
        }

        public void setLowest_temp_battery_probe_num(String lowest_temp_battery_probe_num) {
            this.lowest_temp_battery_probe_num = lowest_temp_battery_probe_num;
        }

        public String getHighest_temp_battery_probe_num() {
            return highest_temp_battery_probe_num;
        }

        public void setHighest_temp_battery_probe_num(String highest_temp_battery_probe_num) {
            this.highest_temp_battery_probe_num = highest_temp_battery_probe_num;
        }

        public String getInsulation_resistance() {
            return insulation_resistance;
        }

        public void setInsulation_resistance(String insulation_resistance) {
            this.insulation_resistance = insulation_resistance;
        }

        public String getTotal_current() {
            return total_current;
        }

        public void setTotal_current(String total_current) {
            this.total_current = total_current;
        }

        public String getHighest_voltage_battery_subsys_num() {
            return highest_voltage_battery_subsys_num;
        }

        public void setHighest_voltage_battery_subsys_num(String highest_voltage_battery_subsys_num) {
            this.highest_voltage_battery_subsys_num = highest_voltage_battery_subsys_num;
        }

        public String getLowest_voltage_battery_single_num() {
            return lowest_voltage_battery_single_num;
        }

        public void setLowest_voltage_battery_single_num(String lowest_voltage_battery_single_num) {
            this.lowest_voltage_battery_single_num = lowest_voltage_battery_single_num;
        }

        public String getBattery_single_lowest_voltage() {
            return battery_single_lowest_voltage;
        }

        public void setBattery_single_lowest_voltage(String battery_single_lowest_voltage) {
            this.battery_single_lowest_voltage = battery_single_lowest_voltage;
        }

        public String getBattery_single_highest_voltage() {
            return battery_single_highest_voltage;
        }

        public void setBattery_single_highest_voltage(String battery_single_highest_voltage) {
            this.battery_single_highest_voltage = battery_single_highest_voltage;
        }

        public String getHighest_temp_battery_subsys_num() {
            return highest_temp_battery_subsys_num;
        }

        public void setHighest_temp_battery_subsys_num(String highest_temp_battery_subsys_num) {
            this.highest_temp_battery_subsys_num = highest_temp_battery_subsys_num;
        }

        public String getLowest_voltage_battery_subsys_num() {
            return lowest_voltage_battery_subsys_num;
        }

        public void setLowest_voltage_battery_subsys_num(String lowest_voltage_battery_subsys_num) {
            this.lowest_voltage_battery_subsys_num = lowest_voltage_battery_subsys_num;
        }

        public String getHighest_voltage_battery_single_num() {
            return highest_voltage_battery_single_num;
        }

        public void setHighest_voltage_battery_single_num(String highest_voltage_battery_single_num) {
            this.highest_voltage_battery_single_num = highest_voltage_battery_single_num;
        }

        public String getLowest_temp() {
            return lowest_temp;
        }

        public void setLowest_temp(String lowest_temp) {
            this.lowest_temp = lowest_temp;
        }

        public String getHighest_temp() {
            return highest_temp;
        }

        public void setHighest_temp(String highest_temp) {
            this.highest_temp = highest_temp;
        }

        public String getLowest_temp_battery_subsys_num() {
            return lowest_temp_battery_subsys_num;
        }

        public void setLowest_temp_battery_subsys_num(String lowest_temp_battery_subsys_num) {
            this.lowest_temp_battery_subsys_num = lowest_temp_battery_subsys_num;
        }

        public String getSoc() {
            return soc;
        }

        public void setSoc(String soc) {
            this.soc = soc;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.total_voltage);
            dest.writeString(this.lowest_temp_battery_probe_num);
            dest.writeString(this.highest_temp_battery_probe_num);
            dest.writeString(this.insulation_resistance);
            dest.writeString(this.total_current);
            dest.writeString(this.highest_voltage_battery_subsys_num);
            dest.writeString(this.lowest_voltage_battery_single_num);
            dest.writeString(this.battery_single_lowest_voltage);
            dest.writeString(this.battery_single_highest_voltage);
            dest.writeString(this.highest_temp_battery_subsys_num);
            dest.writeString(this.lowest_voltage_battery_subsys_num);
            dest.writeString(this.highest_voltage_battery_single_num);
            dest.writeString(this.lowest_temp);
            dest.writeString(this.highest_temp);
            dest.writeString(this.lowest_temp_battery_subsys_num);
            dest.writeString(this.soc);
        }

        public ModelValuesBean() {
        }

        protected ModelValuesBean(Parcel in) {
            this.total_voltage = in.readString();
            this.lowest_temp_battery_probe_num = in.readString();
            this.highest_temp_battery_probe_num = in.readString();
            this.insulation_resistance = in.readString();
            this.total_current = in.readString();
            this.highest_voltage_battery_subsys_num = in.readString();
            this.lowest_voltage_battery_single_num = in.readString();
            this.battery_single_lowest_voltage = in.readString();
            this.battery_single_highest_voltage = in.readString();
            this.highest_temp_battery_subsys_num = in.readString();
            this.lowest_voltage_battery_subsys_num = in.readString();
            this.highest_voltage_battery_single_num = in.readString();
            this.lowest_temp = in.readString();
            this.highest_temp = in.readString();
            this.lowest_temp_battery_subsys_num = in.readString();
            this.soc = in.readString();
        }

        public static final Creator<ModelValuesBean> CREATOR = new Creator<ModelValuesBean>() {
            @Override
            public ModelValuesBean createFromParcel(Parcel source) {
                return new ModelValuesBean(source);
            }

            @Override
            public ModelValuesBean[] newArray(int size) {
                return new ModelValuesBean[size];
            }
        };
    }

    public static class AlarmsBean implements Parcelable {

        /**
         * code : insulation
         * name : 绝缘报警
         * displayCode : E
         * alerts : 2
         * eliminates : 30
         * overTime : 1509434266000
         * over : 1
         * causes : [{"code":"53FdTjgV7EN4syf6sbqU7b","cause":"高压插件漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"5kvT8nWX397D8n75foGpTu","cause":"打气泵漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"4ZWQmSRJ4YhonhxTax7rd3","cause":"高压插头进水","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"EngCQAhYgCq1CwCKueXLDD","cause":"高压配电盒漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"2sRu2yukeqEZPy2uVnNgTd","cause":"直流充电插座低压信号插件进水","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"krG2yueyFar6HBLVCgtXo","cause":"三合一（四合一）辅助驱动漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"25jrxjmfF3dBKAUoCZFKCq","cause":"电池箱进水","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"JrvC4unX8X89bQuTWJV5ua","cause":"DC-DC漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"Ksezt8RhFVM9i3hvgFEz5n","cause":"充电插座进水","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"HKAEn5n5YjnTGeS1vDpthM","cause":"转向泵漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"Lzbm6dqYZFKTFbAhVUaYnA","cause":"电机控制器漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"4RbSnGvGBZtb28gAtYfYbK","cause":"车载充电机漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"SsHAH7cT5tbD76sRLXbhyP","cause":"空调压缩机漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"5D93FY7eecnSbQ1hAVNpuZ","cause":"电机漏电","causeCheck":0,"usageRate":9.99,"sortno":0},{"code":"4nTb5cLTnDkB6FHZn9AUSK","cause":"电池箱漏电","causeCheck":0,"usageRate":9.99,"sortno":0}]
         * schemes : [{"code":"DASxKrA8ggmwVGCrP3H9am","scheme":"行驶状态：检查高压插头是否进水（漏电）","schemeCheck":0,"usageRate":9.99,"sortno":0},{"code":"LxyMTkCuWw5PXg7rhwoqZt","scheme":"充电状态：检查充电线路（充电插座、充电机、低压信号插件、高压插件）","schemeCheck":0,"usageRate":9.99,"sortno":0},{"code":"CwVozH6GqV3dfsc8ThsEu","scheme":"行驶状态：检查高压用电设备（所有）是否漏电","schemeCheck":0,"usageRate":9.99,"sortno":0}]
         */

        private String code;
        private String name;
        private String displayCode;
        private int alerts;
        private int eliminates;
        private long overTime;
        private int over;
        private List<CausesBean> causes;
        private List<SchemesBean> schemes;

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getDisplayCode() {
            return displayCode;
        }

        public void setDisplayCode(String displayCode) {
            this.displayCode = displayCode;
        }

        public int getAlerts() {
            return alerts;
        }

        public void setAlerts(int alerts) {
            this.alerts = alerts;
        }

        public int getEliminates() {
            return eliminates;
        }

        public void setEliminates(int eliminates) {
            this.eliminates = eliminates;
        }

        public long getOverTime() {
            return overTime;
        }

        public void setOverTime(long overTime) {
            this.overTime = overTime;
        }

        public int getOver() {
            return over;
        }

        public void setOver(int over) {
            this.over = over;
        }

        public List<CausesBean> getCauses() {
            return causes;
        }

        public void setCauses(List<CausesBean> causes) {
            this.causes = causes;
        }

        public List<SchemesBean> getSchemes() {
            return schemes;
        }

        public void setSchemes(List<SchemesBean> schemes) {
            this.schemes = schemes;
        }

        public static class CausesBean implements Parcelable {

            /**
             * code : 53FdTjgV7EN4syf6sbqU7b
             * cause : 高压插件漏电
             * causeCheck : 0
             * usageRate : 9.99
             * sortno : 0
             */

            private String code;
            private String cause;
            private int causeCheck;
            private double usageRate;
            private int sortno;

            public String getCode() {
                return code;
            }

            public void setCode(String code) {
                this.code = code;
            }

            public String getCause() {
                return cause;
            }

            public void setCause(String cause) {
                this.cause = cause;
            }

            public int getCauseCheck() {
                return causeCheck;
            }

            public void setCauseCheck(int causeCheck) {
                this.causeCheck = causeCheck;
            }

            public double getUsageRate() {
                return usageRate;
            }

            public void setUsageRate(double usageRate) {
                this.usageRate = usageRate;
            }

            public int getSortno() {
                return sortno;
            }

            public void setSortno(int sortno) {
                this.sortno = sortno;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(this.code);
                dest.writeString(this.cause);
                dest.writeInt(this.causeCheck);
                dest.writeDouble(this.usageRate);
                dest.writeInt(this.sortno);
            }

            public CausesBean() {
            }

            protected CausesBean(Parcel in) {
                this.code = in.readString();
                this.cause = in.readString();
                this.causeCheck = in.readInt();
                this.usageRate = in.readDouble();
                this.sortno = in.readInt();
            }

            public static final Creator<CausesBean> CREATOR = new Creator<CausesBean>() {
                @Override
                public CausesBean createFromParcel(Parcel source) {
                    return new CausesBean(source);
                }

                @Override
                public CausesBean[] newArray(int size) {
                    return new CausesBean[size];
                }
            };
        }

        public static class SchemesBean implements Parcelable {

            /**
             * code : DASxKrA8ggmwVGCrP3H9am
             * scheme : 行驶状态：检查高压插头是否进水（漏电）
             * schemeCheck : 0
             * usageRate : 9.99
             * sortno : 0
             */

            private String code;
            private String scheme;
            private int schemeCheck;
            private double usageRate;
            private int sortno;

            public String getCode() {
                return code;
            }

            public void setCode(String code) {
                this.code = code;
            }

            public String getScheme() {
                return scheme;
            }

            public void setScheme(String scheme) {
                this.scheme = scheme;
            }

            public int getSchemeCheck() {
                return schemeCheck;
            }

            public void setSchemeCheck(int schemeCheck) {
                this.schemeCheck = schemeCheck;
            }

            public double getUsageRate() {
                return usageRate;
            }

            public void setUsageRate(double usageRate) {
                this.usageRate = usageRate;
            }

            public int getSortno() {
                return sortno;
            }

            public void setSortno(int sortno) {
                this.sortno = sortno;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(this.code);
                dest.writeString(this.scheme);
                dest.writeInt(this.schemeCheck);
                dest.writeDouble(this.usageRate);
                dest.writeInt(this.sortno);
            }

            public SchemesBean() {
            }

            protected SchemesBean(Parcel in) {
                this.code = in.readString();
                this.scheme = in.readString();
                this.schemeCheck = in.readInt();
                this.usageRate = in.readDouble();
                this.sortno = in.readInt();
            }

            public static final Creator<SchemesBean> CREATOR = new Creator<SchemesBean>() {
                @Override
                public SchemesBean createFromParcel(Parcel source) {
                    return new SchemesBean(source);
                }

                @Override
                public SchemesBean[] newArray(int size) {
                    return new SchemesBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.code);
            dest.writeString(this.name);
            dest.writeString(this.displayCode);
            dest.writeInt(this.alerts);
            dest.writeInt(this.eliminates);
            dest.writeLong(this.overTime);
            dest.writeInt(this.over);
            dest.writeList(this.causes);
            dest.writeList(this.schemes);
        }

        public AlarmsBean() {
        }

        protected AlarmsBean(Parcel in) {
            this.code = in.readString();
            this.name = in.readString();
            this.displayCode = in.readString();
            this.alerts = in.readInt();
            this.eliminates = in.readInt();
            this.overTime = in.readLong();
            this.over = in.readInt();
            this.causes = new ArrayList<CausesBean>();
            in.readList(this.causes, CausesBean.class.getClassLoader());
            this.schemes = new ArrayList<SchemesBean>();
            in.readList(this.schemes, SchemesBean.class.getClassLoader());
        }

        public static final Creator<AlarmsBean> CREATOR = new Creator<AlarmsBean>() {
            @Override
            public AlarmsBean createFromParcel(Parcel source) {
                return new AlarmsBean(source);
            }

            @Override
            public AlarmsBean[] newArray(int size) {
                return new AlarmsBean[size];
            }
        };
    }

    public static class ComponentsBean implements Parcelable {
        /**
         * compCode : comp_bms
         * compName : BMS
         * displayCode : E
         */

        private String compCode;
        private String compName;
        private String displayCode;


        public String getCompCode() {
            return compCode;
        }

        public void setCompCode(String compCode) {
            this.compCode = compCode;
        }

        public String getCompName() {
            return compName;
        }

        public void setCompName(String compName) {
            this.compName = compName;
        }

        public String getDisplayCode() {
            return displayCode;
        }

        public void setDisplayCode(String displayCode) {
            this.displayCode = displayCode;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.compCode);
            dest.writeString(this.compName);
            dest.writeString(this.displayCode);
        }

        public ComponentsBean() {
        }

        protected ComponentsBean(Parcel in) {
            this.compCode = in.readString();
            this.compName = in.readString();
            this.displayCode = in.readString();
        }

        public static final Creator<ComponentsBean> CREATOR = new Creator<ComponentsBean>() {
            @Override
            public ComponentsBean createFromParcel(Parcel source) {
                return new ComponentsBean(source);
            }

            @Override
            public ComponentsBean[] newArray(int size) {
                return new ComponentsBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.pn);
        dest.writeString(this.vin);
        dest.writeLong(this.createTime);
        dest.writeByte(this.lastTime ? (byte) 1 : (byte) 0);
        dest.writeInt(this.highestAlarmLevel);
        dest.writeInt(this.charging);
        dest.writeDouble(this.lng);
        dest.writeDouble(this.lat);
        dest.writeParcelable(this.modelValues, flags);
        dest.writeList(this.timeLines);
        dest.writeList(this.alarms);
        dest.writeList(this.components);
    }

    public RxDiagnosisAlarm() {
    }

    protected RxDiagnosisAlarm(Parcel in) {
        this.pn = in.readString();
        this.vin = in.readString();
        this.createTime = in.readLong();
        this.lastTime = in.readByte() != 0;
        this.highestAlarmLevel = in.readInt();
        this.charging = in.readInt();
        this.lng = in.readDouble();
        this.lat = in.readDouble();
        this.modelValues = in.readParcelable(ModelValuesBean.class.getClassLoader());
        this.timeLines = new ArrayList<Long>();
        in.readList(this.timeLines, Long.class.getClassLoader());
        this.alarms = new ArrayList<AlarmsBean>();
        in.readList(this.alarms, AlarmsBean.class.getClassLoader());
        this.components = new ArrayList<ComponentsBean>();
        in.readList(this.components, ComponentsBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<RxDiagnosisAlarm> CREATOR = new Parcelable.Creator<RxDiagnosisAlarm>() {
        @Override
        public RxDiagnosisAlarm createFromParcel(Parcel source) {
            return new RxDiagnosisAlarm(source);
        }

        @Override
        public RxDiagnosisAlarm[] newArray(int size) {
            return new RxDiagnosisAlarm[size];
        }
    };
}
